<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>DingDing Admin</title>
    <!-- base:css -->
    <div th:include="includeJs::bootstrap_js"></div>
    <div th:include="includeJs::layui_js"></div>
</head>
<div class="container-scroller d-flex">
    <div th:replace="includeJs::admin_leftNav"></div>

    <div class="container-fluid page-body-wrapper">
        <div th:replace="includeJs::admin_nav"></div>
        <div class="main-panel">
            <div class="col-12 grid-margin stretch-card">
                <div class="card">
                    <div class="card-body col-6 layui-col-lg-offset3" >
                        <h4 class="card-title">借贷修改</h4>
                        <form class="forms-sample" th:action="@{/admin/updDebit}" method="post">
                            <input type="hidden" name="mId" th:value="${debit.MId}">
                            <div class="form-group">
                                <label for="mName">标名称</label>
                                <input type="text" th:value="${debit.MName}" name="mName" class="form-control" id="mName" placeholder="请输入标名称">
                            </div>
                            <div class="form-group">
                                <label for="mType">标类型</label>
                                <select style="padding: 10px;" name="mType" class="form-control" id="mType">
                                    <option th:each="d: ${dType}" th:selected="${d.TId==debit.MType}"  th:value="${d.TId}" th:text="${d.type}"></option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="month">期限(月)</label>
                                <input type="number" name="month" step="1" th:value="${debit.month}" class="form-control" id="month" placeholder="请输入月份">
                            </div>
                            <div class="form-group">
                                <label for="needLevel">用户信用等级需求</label>
                                <select name="needLevel" class="form-control" id="needLevel">
                                    <option th:selected="${debit.needLevel==0}">0</option>
                                    <option th:selected="${debit.needLevel==1}">1</option>
                                    <option th:selected="${debit.needLevel==2}">2</option>
                                    <option th:selected="${debit.needLevel==3}">3</option>
                                    <option th:selected="${debit.needLevel==4}">4</option>
                                    <option th:selected="${debit.needLevel==5}">5</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="minMoney">借款最小金额</label>
                                <input name="minMoney" th:value="${debit.minMoney}" type="number" class="form-control" id="minMoney"  placeholder="请输入借款最小金额">
                            </div>
                            <div class="form-group">
                                <label for="maxMoney">借款最大金额</label>
                                <input name="maxMoney" th:value="${debit.maxMoney}" id="maxMoney" type="number" class="form-control"  placeholder="请输入借款最大金额">
                            </div>
                            <div class="form-group">
                                <label for="totalAmount">借款总额</label>
                                <input name="totalAmount" th:value="${debit.totalAmount}" id="totalAmount" type="number" class="form-control"  placeholder="请输入借款总金额">
                            </div>
                            <div class="form-group">
                                <label>是否抵押</label>
                                <input type="radio" name="idPledge" th:checked="${debit.idPledge==T(com.ddf.publics.tool.Constant).PLEDGE_YES}" th:value="${T(com.ddf.publics.tool.Constant).PLEDGE_YES}">是
                                <input type="radio" name="idPledge" th:checked="${debit.idPledge==T(com.ddf.publics.tool.Constant).PLEDGE_NO}"  th:value="${T(com.ddf.publics.tool.Constant).PLEDGE_NO}">否
                            </div>
                            <div class="form-group">
                                <label for="day">几天放款</label>
                                <input type="number" th:value="${debit.day}" class="form-control" name="day" id="day"  placeholder="请输入放款天数">
                            </div>
                            <div class="form-group">
                                <label for="yearInterset">年利率</label>
                                <div class="input-group">
                                    <div class="input-group-prepend">
                                        <span class="input-group-text bg-primary text-white">$</span>
                                    </div>
                                    <input th:value="${debit.yearInterset*100}" type="number" step="0.01"  class="form-control" name="yearInterset" aria-label="Amount (to the nearest dollar)" id="yearInterset" placeholder="请输入年利率">
                                    <div class="input-group-append">
                                        <span class="input-group-text">%</span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>是否售罄</label> &nbsp;&nbsp;&nbsp;
                                <input type="radio"  name="sellOut" th:value="${T(com.ddf.publics.tool.Constant).SELL_OUT_YES}">是&nbsp;
                                <input type="radio" name="sellOut" checked="checked"  th:value="${T(com.ddf.publics.tool.Constant).SELL_OUT_NO}">否

                            </div>
                            <div class="form-group">
                                <label>是否下架</label>&nbsp;&nbsp;&nbsp;
                                <input type="radio" name="soldOut" th:checked="${debit.soldOut==T(com.ddf.publics.tool.Constant).SOLD_OUT_YES}"  th:value="${T(com.ddf.publics.tool.Constant).SOLD_OUT_YES}">是&nbsp;
                                <input type="radio"  name="soldOut"  th:checked="${debit.soldOut==T(com.ddf.publics.tool.Constant).SOLD_OUT_NO}">否

                            </div>
                            <div class="form-group">
                                <label FOR="mComment">备注</label>
                                <textarea name="mComment" id="mComment"  class="form-control">[[${debit.MComment}]]</textarea>
                            </div>
                            <button type="submit" class="btn btn-primary mr-2">修改</button>
                            <a class="btn btn-light" th:href="@{/admin/debit}">取消</a>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>